import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import '../src/assets/style.css'
import 'vant/lib/index.css';
import 'amfe-flexible'
import { Image as VanImage } from 'vant';
import '@vant/touch-emulator'
import {
  Tabbar,
  TabbarItem,
  Grid,
  GridItem,
  Search,
  Icon,
  Tab,
  Tabs,
  Swipe,
  SwipeItem,
  ActionBar,
  ActionBarIcon,
  ActionBarButton,
  PullRefresh,
  RollingText,
  Button,
  Popup,
  Sticky,
  Col,
  Row,Field, CellGroup,CountDown,Uploader,Dialog 
} from 'vant';

import pinia from './store/inedx.js';

router.beforeEach((to,from,next) =>{
  if(to.meta.title){
    document.title = to.meta.title;
  }
  next()
})

const app = createApp(App)
app.use(Tab);
app.use(Tabs);
app.use(Icon);
app.use(VanImage);
app.use(Tabbar)
app.use(TabbarItem)
app.use(Grid);
app.use(GridItem);
app.use(Search);
app.use(router)
app.use(Swipe);
app.use(SwipeItem);
app.use(ActionBar);
app.use(ActionBarIcon);
app.use(ActionBarButton);
app.use(PullRefresh);
app.use(RollingText);
app.use(Button);
app.use(Popup);
app.use(Sticky);
app.use(Col);
app.use(Row)
app.use(Field)
app.use(CellGroup)
app.use(CountDown)
app.use(pinia)
app.use(Uploader)
app.use(Dialog)
app.mount('#app')
